import React,{lazy} from 'react'
import {
  AppOutline,
  MessageOutline,
  UnorderedListOutline,
  UserOutline,
} from 'antd-mobile-icons'


const MainLayout = lazy(()=>import('../pages/mainLayout'))
const Home = lazy(()=>import('../pages/home'))
const Class = lazy(()=>import('../pages/class'))
const Message = lazy(()=>import('../pages/message'))
const My = lazy(()=>import('../pages/my'))

export const homeRoutes = [
  {
    path:'/home',
    element:<Home></Home>,
    title:'首页',
    icon:<AppOutline />
  },
  {
    path:'/class',
    element:<Class></Class>,
    title:'分类',
    icon:<UnorderedListOutline />
  },
  {
    path:'/message',
    element:<Message></Message>,
    title:'消息',
    icon:<MessageOutline />
  },
  {
    path:'/my',
    element:<My></My>,
    title:'我的',
    icon:<UserOutline />
  },
]

export const routes = [
  {
    path:'/',
    element:<MainLayout></MainLayout>,
    children:[
      ...homeRoutes,
      {
        path:'/',
        element:<Home></Home>
      }
    ],
  },
]